package com.gqr.threadpool;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Copyright (C), 2020-2024,gqr
 * FileName:CachedThreadPool
 * author:guqingrong
 * Date:2024-05-06 21:38
 * Description: CachedThreadPool带有缓存的
 * History:
 * <author>    <time>    <version>    <desc>
 * 作者姓名     修改时间     版本号        描述
 */
public class CachedThreadPool {
    public static void main(String[] args) {
        ExecutorService executorService = Executors.newCachedThreadPool();

        for (int i = 0; i < 1000; i++) {
            executorService.execute(new Task());
        }

    }
}
